



<div class="bjui-pageContent tableContent" id="div1">
    <table>
        <div id="totalchipyieldbyday" style="width:30%;height:90%;" ></div>
        <script  src="${request.getContextPath()}/js/echarts/echarts.js"></script>
        <script  src="${request.getContextPath()}/js/echarts/echarts-tool.js"></script>
        <g:if test="${totalChipYieldByDayRpt.size()>0}">
            <script type="text/javascript">
                // 基于准备好的dom，初始化echarts实例
                var contextPath = "${request.getContextPath()}";
                eChartsTool.init(contextPath);
                var data=[];
                <g:each in="${totalChipYieldByDayRpt}" status="i" var="tableInstance">
                data.push('${tableInstance.TIME}')
                </g:each>

                // 指定图表的配置项和数据
                var option = {
                    title: {
                        text: '',
                        textStyle:{fontSize:25}
                    },
                    tooltip: {},
                    legend: {
                        data:['目标','实际'],
                        textStyle:{fontSize:25}

                    },
                    xAxis: {
                        "axisLabel":{
                            "interval":0,
                            /* "rotate":45,*/
                            textStyle:{fontSize:25}
                        },
                        data:data

                    },
                    yAxis : [
                        {
                            type : 'value',
                            name:'',
                            axisLabel : {
                                formatter: '{value}%',
                                textStyle:{fontSize:20}
                            },
                            show:true
                        }/*,
                         {
                         type : 'value',
                         name:'',

                         axisLabel : {
                         formatter: '{value}',
                         textStyle:{fontSize:25}
                         },
                         show:true
                         }*/
                    ],
                    series: [{
                        name: '目标',
                        type: 'bar',
                        itemStyle:{
                            normal:{
                                color:'#000000'
                            }
                        },
                        data: ${totalChipYieldByDayRpt.TARGET}
                    },
                        {
                            name: '实际',
                            type: 'bar',
                            itemStyle:{
                                normal:{
                                    color:'#EA0000'
                                }
                            },
                            data: ${totalChipYieldByDayRpt.ACTUAL_CHIP_YIELD}
                        }]
                };

                // 使用刚指定的配置项和数据显示图表。
                eChartsTool.setOption("macarons", document.getElementById('totalchipyieldbyday'), option);

            </script>
        </g:if>
    </table>
</div>